Skip to content

feat: speed-up livesync with HMR #4020

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 12, 2018

Conversation

rosen-vladimirov
Copy link
Contributor

In case HMR is used, webpack reports to CLI the already prepared files, so there's no need for CLI to do any preparation, just sync the files. Try sending them as soon as possible and if we fail, go through the normal worklfow.

Ensure the code is called only when webpack had produced files for us and we are with HMR enabled.

PR Checklist

What is the current behavior?

Applying a change when CLI is livesyncing with HMR takes from 1.5 to 5 seconds.

What is the new behavior?

Applying a change when CLI is livesyncing with HMR takes from below 1 second.

In case HMR is used, webpack reports to CLI the already prepared files, so there's no need for CLI to do any preparation, just sync the files. Try sending them as soon as possible and if we fail, go through the normal worklfow.

Ensure the code is called only when webpack had produced files for us and we are with HMR enabled.
@rosen-vladimirov rosen-vladimirov merged commit 7aa666d into master Oct 12, 2018
@rosen-vladimirov rosen-vladimirov deleted the vladimirov/prepare-perf-improvements-2 branch October 12, 2018 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants